From bce846e928e960e912d151ee041bc736e615eab5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 9 Jun 2010 13:29:22 +0100 Subject: [PATCH] xen-watchdog: Move init script to OS-dep dir and implement for netbsd Signed-off-by: Christoph Egger Signed-off-by: Keir Fraser --- tools/hotplug/Linux/Makefile | 1 + .../Linux/init.d}/xen-watchdog | 0 tools/hotplug/NetBSD/Makefile | 2 +- tools/hotplug/NetBSD/rc.d/xen-watchdog | 23 +++++++++++++++++++ tools/misc/Makefile | 4 ---- 5 files changed, 25 insertions(+), 5 deletions(-) rename tools/{misc => hotplug/Linux/init.d}/xen-watchdog (100%) create mode 100644 tools/hotplug/NetBSD/rc.d/xen-watchdog diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile index 99749fae89..19d88ab87d 100644 --- a/tools/hotplug/Linux/Makefile +++ b/tools/hotplug/Linux/Makefile @@ -71,6 +71,7 @@ install-initd: $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysconfig/xendomains $(INSTALL_PROG) $(XENCOMMONS_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d $(INSTALL_PROG) $(XENCOMMONS_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysconfig/xencommons + $(INSTALL_PROG) init.d/xen-watchdog $(DESTDIR)$(CONFIG_DIR)/init.d .PHONY: install-scripts install-scripts: diff --git a/tools/misc/xen-watchdog b/tools/hotplug/Linux/init.d/xen-watchdog similarity index 100% rename from tools/misc/xen-watchdog rename to tools/hotplug/Linux/init.d/xen-watchdog diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile index cd68304751..98c1c5bbd4 100644 --- a/tools/hotplug/NetBSD/Makefile +++ b/tools/hotplug/NetBSD/Makefile @@ -8,7 +8,7 @@ XEN_SCRIPTS += vif-bridge XEN_SCRIPTS += vif-ip XEN_SCRIPT_DATA = -XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains +XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains rc.d/xen-watchdog .PHONY: all all: diff --git a/tools/hotplug/NetBSD/rc.d/xen-watchdog b/tools/hotplug/NetBSD/rc.d/xen-watchdog new file mode 100644 index 0000000000..ff4a52c134 --- /dev/null +++ b/tools/hotplug/NetBSD/rc.d/xen-watchdog @@ -0,0 +1,23 @@ +#!/bin/sh +# +# PROVIDE: xen-watchdog +# REQUIRE: DAEMON +# +# description: Run domain watchdog daemon +# + +. /etc/rc.subr + +DIR=$(dirname "$0") +. "${DIR}/xen-hotplugpath.sh" + +LD_LIBRARY_PATH="${LIBDIR}" +export LD_LIBRARY_PATH + +name="xenwatchdog" +rcvar=$name +command="${SBINDIR}/xenwatchdogd" +start_cmd="echo Starting ${name}. && PATH=${PATH}:${SBINDIR} ${command} 30 15" + +load_rc_config $name +run_rc_command "$1" diff --git a/tools/misc/Makefile b/tools/misc/Makefile index f8709562e2..843de9d3ec 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -41,10 +41,6 @@ install: build $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR) $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR) -ifeq ($(CONFIG_Linux),y) - $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/init.d - $(INSTALL_PROG) xen-watchdog $(DESTDIR)$(CONFIG_DIR)/init.d -endif set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done .PHONY: clean -- 2.30.2